using System.ComponentModel.DataAnnotations;

namespace RAG.Domain.Entities.App;

/// <summary>
/// 角色实体
/// </summary>
public class Role : EntityBase
{
    public Guid Id { get; set; }
    
    [StringLength(50, ErrorMessage = "角色名称长度不能超过50个字符")]
    public string RoleName { get; set; } = null!; // 角色名称
    
    [StringLength(200, ErrorMessage = "角色描述长度不能超过200个字符")]
    public string? RoleDescription { get; set; } // 角色描述
    
    // 导航属性
    public ICollection<Users> Users { get; set; } = new List<Users>();
    public ICollection<Permission> Permissions { get; set; } = new List<Permission>();
} 